import axios from "./axios";
//获取城市列表
export const getCityList = () => {
    return axios({
        method: "get",
        url: "http://127.0.0.1:12345/api/city/list"
    })
}
// //获取当前城市名称
// export const getCityName = (key: string) => {
//     return axios({
//         url: "/gaode/v3/ip?key=" + key,
//         method: "get"
//     }
//     )
// }
//获取列表页
export const getList = () => {
    return axios({
        method: "get",
        url: "http://127.0.0.1:12345/api/flight/list"
    })
}
//获取详情页
export const getDetai = (id: string) => {
    return axios({
        method: "get",
        url: "http://127.0.0.1:12345/api/flight/detail/" + id
    })
}
//获取登录
type forLogin = {
    tel: string,
    code: string
}
export const userLogin = (data: forLogin) => {
    return axios({
        method: "post",
        url: "http://127.0.0.1:12345/api/user/login",
        data
    })
}
//获取验证码
export const getUserCaptcha = (tel: string) => {
    return axios({
        method: "post",
        url: "http://127.0.0.1:12345/api/user/getCaptcha",
        data: {
            tel
        }
    })
}